﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListadoSupervision.aspx.cs"
    Inherits="Supervision_ListadoSupervision" %>

<%--<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>--%>
<%@ Register Src="wucInformeSupervision.ascx" TagName="wucInformeSupervision" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:Store ID="StoreSupervision" runat="server" OnRefreshData="StoreSupervisionRefresh" >
        <Reader>
            <ext:JsonReader IDProperty="Id">
                <Fields>
                    <ext:RecordField Name="Id" />
                    <ext:RecordField Name="Actividad" />
                    <ext:RecordField Name="Fecha" Type="Date" DateFormat="Y-m-dTh:i:s" />
                    <ext:RecordField Name="Descripcion" />
                    <ext:RecordField Name="ProyectoId" />
                </Fields>
            </ext:JsonReader>
        </Reader>
         <Proxy>
            <ext:PageProxy></ext:PageProxy>
        </Proxy>
    </ext:Store>
    <ext:Hidden runat="server" ID="hidIdProyecto" />
    <ext:ResourceManager runat="server" Theme="Slate">
    </ext:ResourceManager>
    <ext:Panel ID="Panel2" Layout="Form" runat="server" ButtonAlign="Center" Border="false" BodyStyle="padding:10px;">
        <Items>
        
                    <ext:TextArea AnchorHorizontal="97.5%" ReadOnly="true" ID="txtNombre" runat="server" FieldLabel="Nombre del Proyecto">
                    </ext:TextArea>
              
                    <ext:TextArea  AnchorHorizontal="97.5%" ReadOnly="true"  ID="txaDescripcion" runat="server" FieldLabel="Descripción del Proyecto">
                    </ext:TextArea>
               
        </Items>
    </ext:Panel>
    <ext:Panel ID="Panel1" runat="server" ButtonAlign="Center" Border="false" BodyStyle="padding:10px;">
        <Items>
            <ext:GridPanel ID="GridPanelSupervision" runat="server" StoreID="StoreSupervision"
                StripeRows="true" AutoWidth="true" Height="250px" AutoExpandColumn="Descripcion">
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server" AutoWidth="true">
                        <Items>
                            <ext:Button ID="btnNuevo" runat="server" Text="Nuevo" Icon="NoteEdit">
                                <DirectEvents>
                                    <Click OnEvent="Nuevo_Click">
                                        <ExtraParams>
                                            <ext:Parameter Name="Id" Value="#{hidIdProyecto}.getValue()" Mode="Raw" />
                                        </ExtraParams>
                                        <EventMask ShowMask="true" />
                                    </Click>
                                </DirectEvents>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <ColumnModel ID="ColumnModel1" runat="server">
                    <Columns>
                         <ext:CommandColumn Header="Opción">
                            <Commands>
                                <ext:GridCommand CommandName="Ver" Text="Ver" Icon="CommentEdit" ToolTip-Text="Ver detalle del informe de supervision emitido">
                                </ext:GridCommand>
                            </Commands>
                        </ext:CommandColumn>

                        <ext:Column Header="Fecha de ingreso" Width="160" Sortable="true" DataIndex="Fecha" />
                        <ext:Column Header="Actividad" Width="150" Sortable="true" DataIndex="Actividad">
                        </ext:Column>
                        <ext:Column ColumnID="Descripcion" Header="Descripcion" Width="200" Sortable="true"
                            DataIndex="Descripcion">
                        </ext:Column>
                      
                    </Columns>
                </ColumnModel>
                <DirectEvents>
                    <Command OnEvent="VerDetalleInforme">
                        <ExtraParams>
                            <ext:Parameter Name="Comando" Value="command" Mode="Raw" Encode="False" />
                            <ext:Parameter Name="Id" Value="record.data.Id" Mode="Raw" />
                        </ExtraParams>
                    </Command>
                </DirectEvents>
                <SelectionModel>
                    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
                    </ext:RowSelectionModel>
                </SelectionModel>
            </ext:GridPanel>
        </Items>
    </ext:Panel>
    <uc2:wucInformeSupervision runat="server" ID="wucInformeSupervision1" />
    </form>
</body>
</html>
